Shader "Unlit/TestShader"
{
    Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }
        LOD 100

        Pass
        {
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            // make fog work
            #pragma multi_compile_fog

            #include "UnityCG.cginc"

            struct appdata
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
            };

            struct v2f
            {
                float2 uv : TEXCOORD0;
                UNITY_FOG_COORDS(1)
                float4 vertex : SV_POSITION;
            };

            sampler2D _MainTex;
            float4 _MainTex_ST;

            v2f vert (appdata v)
            {
                v2f o;
                o.vertex = UnityObjectToClipPos(v.vertex);
                o.uv = TRANSFORM_TEX(v.uv, _MainTex);
                UNITY_TRANSFER_FOG(o,o.vertex);
                return o;
            }

            fixed4 frag (v2f i) : SV_Target
            {
                // sample the texture
                fixed4 col = tex2D(_MainTex, i.uv);
                // apply fog
                UNITY_APPLY_FOG(i.fogCoord, col);
                return col;
            }
            ENDCG
        }
    }
}
/*


                
Shader "Custome/Grass"
{
    Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
        _TimeOffset ("TimeOffset", Range(0, 1)) = 0
    }
    SubShader
    {
        Tags{"Queue" = "Transparent"  "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "Lit" "IgnoreProjector" = "True"}
        Blend SrcAlpha OneMinusSrcAlpha 
        ZWrite Off
        Blend SrcAlpha OneMinusSrcAlpha
        LOD 300
        Pass
        {
            HLSLPROGRAM

            #pragma target 2.0
            
            #pragma vertex vert
            #pragma fragment frag
            
            #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
            #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
            #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"


            struct VertexInput
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
                float3 normal: NORMAL;
            };
            struct VertexOutput
            {
                float2 uv : TEXCOORD0;
                float4 vertex : SV_POSITION;
                float3 lightColor: COLOR3;
            };

            
            CBUFFER_START(UnityPerMaterial)
            float4 _MainTex_TexelSize;
            float _TimeOffset;
            CBUFFER_END
            TEXTURE2D (_MainTex);SAMPLER(sampler_MainTex);
            
            VertexOutput vert (VertexInput v)
            {
                VertexOutput o;
                const float4 offset = float4(sin(3.1416 * (_Time.y + _TimeOffset))* clamp(v.uv.y, 0, 1)  * 0.1, 0, 0, 0);
                o.vertex = TransformObjectToHClip(v.vertex + offset);
                o.uv = v.uv;
                Light light = GetMainLight();
                o.lightColor = LightingLambert(light.color.rgb, light.direction, TransformObjectToWorldNormal(v.normal));
                return o;
            }
            
            half4 frag (VertexOutput v) : SV_Target
            {
                half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex,v.uv);
                float3 diffuse = v.lightColor * col.rgb;
                return float4(diffuse, col.a);
            }
            ENDHLSL
        }
    }
}*/